package fr.upmc.i3s.fuglmeyeranalyser.models;

import fr.upmc.i3s.fuglmeyeranalyser.models.solutions.AbstractMCOSolution;
import fr.upmc.i3s.fuglmeyeranalyser.models.solutions.AbstractMCPSolution;
import fr.upmc.i3s.fuglmeyeranalyser.models.solutions.AbstractMCPkSolution;
import fr.upmc.i3s.fuglmeyeranalyser.models.solutions.SolutionList;
import fr.upmc.i3s.fuglmeyeranalyser.patients.Patient;
import fr.upmc.i3s.fuglmeyeranalyser.patients.PatientList;

public abstract class Model {
	
	  /////////////////////////////////
	 // SOLVING METHODS FOR PATIENT //
	/////////////////////////////////
	
	/**
	 * Solve MCP-k system for the given patient
	 * @param patient
	 * @return MCPkSolution
	 */
	public abstract AbstractMCPkSolution solveMCPkSystemForPatient(Patient patient);
	
	/**
	 * Solve MCP system for the given patient
	 * @param patient
	 * @return MCPkSolution
	 */
	public abstract AbstractMCPSolution solveMCPSystemForPatient(Patient patient);

	/**
	 * Solve MC0 system for the given patient
	 * @param patient
	 * @return MCPkSolution
	 */
	public abstract AbstractMCOSolution solveMCOSystemForPatient(Patient patient);
	
	
	  ///////////////////////////////////////
	 // SOLVING METHODS FOR PATIENTS LIST //
	///////////////////////////////////////
	
	/**
	 * Solve MCP-k system for the patient list
	 * @param patient
	 * @return SolutionList
	 */
	public SolutionList solveMCPkSystemForPatientList(PatientList patientList) {
		SolutionList solutions = new SolutionList();
		for(Patient patient : patientList) {
			solutions.add(solveMCPkSystemForPatient(patient));
		}
		return solutions;
	}

	/**
	 * Solve MCP system for the patient list
	 * @param patient
	 * @return SolutionList
	 */
	public SolutionList solveMCPSystemForPatientList(PatientList patientList) {
		SolutionList solutions = new SolutionList();
		for(Patient patient : patientList) {
			solutions.add(solveMCPSystemForPatient(patient));
		}
		return solutions;
	}

	/**
	 * Solve MCO system for the patient list
	 * @param patient
	 * @return SolutionList
	 */
	public SolutionList solveMCOSystemForPatientList(PatientList patientList) {
		SolutionList solutions = new SolutionList();
		for(Patient patient : patientList) {
			solutions.add(solveMCOSystemForPatient(patient));
		}
		return solutions;
	}
	
}
